import React, { Component } from 'react'

export default class App extends Component {
    a = '111'
    render() {
        return (
            <div>
                <input />
                <button onClick={() => {
                    console.log('click1',this.a);
                }}>add1</button>
                <button onClick={this.handlerClick2.bind()}>add2</button>
                <button onClick={this.handlerClick3}>add3</button>
                <button onClick={ ()=>{
                    this.handlerClick4()
                } }>add4</button>
            </div>
        )
    }
    handlerClick2() {
        console.log('click2',this.a);
    }
    handlerClick3 = (e) => {
        console.log('click3',this.a,e.target);
    }
    handlerClick4 = () => {
        console.log('click4',this.a);
    }
}


